import request from '@/utils/request.js'

// 获取文章相关评论列表
export const getForumArticleCommentListService = (formData) => {
  return request.get('/user/forumComment/getForumCommentList',
    { params: formData }
  )
}

// 发布评论
export const postForumCommentService = (formData) => {
  return request.post('/user/forumComment/postForumComment', formData, {
    headers: { 'Content-Type': 'multipart/form-data' },
  })
}

// 评论点赞
export const doCommentLikeService = (formData) => {
  return request.post('/user/forumComment/doCommentLike', formData)
}

// 评论置顶、取消置顶
export const changeCommentTopTypeService = (formData) => {
  return request.post('/user/forumComment/changeCommentTopType', formData)
}

// 获取“我的文章评论列表”（其他人评论我，接收人是我）
export const getMyForumCommentListService = (formData) => {
  return request.get('/user/forumComment/getMyForumCommentList',
    { params: formData }
  )
}

// 获取“我发表的文章评论”（我评论其他人，发表人是我）
export const getMyPostForumCommentListService = (formData) => {
  return request.get('/user/forumComment/getMyPostForumCommentList',
    { params: formData }
  )
}

// 根据评论ID删除文章
export const deleteForumCommentByCommentIdService = (formData) => {
  return request.delete('/user/forumComment/deleteForumCommentByCommentId',
    { params: formData }
  )
}